﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace ZhimeiSoft.CharmManager.DOL
{
    public class DBEntityTimeCallDetail : DBEntityBase
    {
        /// <summary>
        /// 表名称
        /// </summary>
        /// <returns></returns>
        public override string GetTableName()
        {
            return "TIMECALLDETAIL";
        }


        public DBEntityTimeCallDetail()
            : base()
        {
        }

        public DBEntityTimeCallDetail(DataRow drRow)
        {
            this.TIMECALLID = Convert.ToInt32(drRow[DBEntityTimeCallDetail.FieldName.TIMECALLID]);
            this.TCALLSTATE = drRow[DBEntityTimeCallDetail.FieldName.TCALLSTATE].ToString();
            this.TCALLTIME = Convert.ToDateTime(drRow[DBEntityTimeCallDetail.FieldName.TCALLTIME]);
        }
        /// <summary>
        /// 生成的提醒时间
        /// </summary>
        public DateTime TCALLTIME { get; set;}
        /// <summary>
        /// 提醒完成 T0F、提醒未完成 TOE 默认为T0E
        /// </summary>
	    public string TCALLSTATE {get; set;}
        /// <summary>
        /// 主表TIMECALL 中的ID
        /// </summary>
        public int TIMECALLID { get; set; }
        /// <summary>
        /// 字段名称
        /// </summary>
        public static class FieldName
        {
            /// <summary>
            /// 生成的提醒时间
            /// </summary>
            public const string TCALLTIME = "TCALLTIME";
            /// <summary>
            /// 提醒完成 T0F、提醒未完成 TOE 默认为T0E
            /// </summary>
            public const string TCALLSTATE = "TCALLSTATE";
            /// <summary>
            /// 主表TIMECALL 中的ID
            /// </summary>
            public const string TIMECALLID = "TIMECALLID";
        }
        /// <summary>
        /// 提醒完成 T0F、提醒未完成 TOE 默认为T0E
        /// </summary>
        public static class ENUM_TCALLSTATE
        {
            /// <summary>
            /// 提醒完成 T0F
            /// </summary>
            public const string T0F = "T0F";
            /// <summary>
            /// 提醒未完成 TOE
            /// </summary>
            public const string T0E = "TOE";
            /// <summary>
            /// 提醒完成 T0F
            /// </summary>
            public const string T0F_CHINESE = "提醒完成";
            /// <summary>
            /// 提醒未完成 TOE
            /// </summary>
            public const string T0E_CHINESE = "提醒未完成";

            /// <summary>
            /// 根据枚举值返回中文
            /// </summary>
            /// <param name="cState">枚举值</param>
            /// <returns>返回中文</returns>
            public static string EnumStrToChineseStr(string cState)
            {
                string[] serchStr = new string[] { T0F, T0E};
                string[] sReturnStr = new string[] { T0F_CHINESE, T0E_CHINESE};
                return DBEntityBase.GetStrReturnStr(cState, serchStr, sReturnStr);
            }
            /// <summary>
            /// 根据中文返回枚举值
            /// </summary>
            /// <param name="chineseStr">中文</param>
            /// <returns>返回枚举字符串</returns>
            public static string ChineseStrToEnumStr(string chineseStr)
            {
                string[] serchStr = new string[] { T0F_CHINESE, T0E_CHINESE };
                string[] sReturnStr = new string[] { T0F, T0E };
                return DBEntityBase.GetStrReturnStr(chineseStr, serchStr, sReturnStr);
            }
        }
    }
}

